package com.zty.utils.impl;

import com.zty.BO.FileChunkMeta;
import com.zty.utils.ChunkAddressBuilder;
import org.springframework.stereotype.Component;

/**
 * @Author ZTY
 * @Description
 * @Date 13:04 2023-12-25
 **/

@Component
public class HttpChunkAddressBuilder implements ChunkAddressBuilder {
    @Override
    public String build(FileChunkMeta chunkMeta) {
        return "%s:/%s".formatted(chunkMeta.getSchema(),chunkMeta.getAddress());
    }

    @Override
    public String schema() {
        return "http";
    }
}
